<template>
    <rx-dialog @handOk="handOk" @cancel="cancel" order="buttom" btnalign="center">
        <rx-layout>
            <div slot="center">
                <a-checkbox-group v-model="checkedList" :options="plainOptions" />
            </div>
        </rx-layout>
    </rx-dialog>
</template>

<script>
    import {Util,RxDialog,RxLayout} from "@lowcode/jpaas-common-lib";
    import FormSolutionApi from "@/api/form/core/formSolution";
    export default {
        name: "SysLogResume",
        components:{
            RxDialog,
            RxLayout
        },
        props:{
            alias: String,
            appId: String,
            layerid: String,
            destroy:Function
        },
        data(){
            return {
                checkedList:[],
                plainOptions:[]
            }
        },
        created() {
            this.init();
        },
        methods:{
            init(){
                if(this.alias){
                    FormSolutionApi.getBoEnts(this.alias,this.appId).then(res=>{
                        this.plainOptions=res.data.map(item=>{
                            return {label:item.name,value:item.alias};
                        });
                    })
                }
            },
            getData(){
                return this.checkedList.join(",");
            },
            handOk(){
                Util.closeWindow(this,'ok',this.getData());
            },
            cancel(){
                Util.closeWindow(this,'cancel');
            }
        }
    }
</script>

<style scoped>

</style>